home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'OleCtnrs.pas' rev: 3.00
-
- #ifndef OleCtnrsHPP
- #define OleCtnrsHPP
- #include <ComObj.hpp>
- #include <Graphics.hpp>
- #include <Menus.hpp>
- #include <Forms.hpp>
- #include <Controls.hpp>
- #include <Classes.hpp>
- #include <SysUtils.hpp>
- #include <OleDlg.hpp>
- #include <ActiveX.hpp>
- #include <Commctrl.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
- #include <DocObj.h>
-
- namespace Olectnrs
- {
- //-- type declarations -------------------------------------------------------
- __interface IVCLFrameForm;
- typedef System::DelphiInterface<IVCLFrameForm> _di_IVCLFrameForm;
- class DELPHICLASS TOleContainer;
- __interface IVCLFrameForm : public IOleInPlaceFrame /* __guid="{CD02E1C0-52DA-11D0-9EA6-0020AF3D82DA}" */
-
- {
-
- public:
- virtual void __fastcall AddContainer(TOleContainer* Instance) = 0;
- virtual void __fastcall RemoveContainer(TOleContainer* Instance) = 0;
- virtual void __fastcall ClearBorderSpace(void) = 0;
- virtual Forms::TCustomForm* __fastcall Form(void) = 0;
- };
-
- enum TAutoActivate { aaManual, aaGetFocus, aaDoubleClick };
-
- enum TSizeMode { smClip, smCenter, smScale, smStretch, smAutoSize };
-
- enum TObjectState { osEmpty, osLoaded, osRunning, osOpen, osInPlaceActive, osUIActive };
-
- enum TCreateType { ctNewObject, ctFromFile, ctLinkToFile, ctFromData, ctLinkFromData };
-
- struct TCreateInfo
- {
- TCreateType CreateType;
- bool ShowAsIcon;
- int IconMetaPict;
- GUID ClassID;
- System::WideString FileName;
- _di_IDataObject DataObject;
- } ;
-
- struct TVerbInfo
- {
- short Verb;
- Word Flags;
- } ;
-
- typedef void __fastcall (__closure *TObjectMoveEvent)(TOleContainer* OleContainer, const Windows::TRect
- &Bounds);
-
- class PASCALIMPLEMENTATION TOleContainer : public Controls::TCustomControl
- {
- typedef Controls::TCustomControl inherited;
-
- private:
- void *__IUnknown; /* IUnknown */
- void *__IOleClientSite; /* IOleClientSite */
- void *__IOleInPlaceSite; /* IOleInPlaceSite */
- void *__IAdviseSink; /* IAdviseSink */
- void *__IOleDocumentSite; /* IOleDocumentSite */
- void *__iOleUIObjInfo; /* Oledlg::iOleUIObjInfo */
-
- public:
- operator iOleUIObjInfo*(void) { return (iOleUIObjInfo*)&__iOleUIObjInfo; }
- operator IOleDocumentSite*(void) { return (IOleDocumentSite*)&__IOleDocumentSite; }
- operator IAdviseSink*(void) { return (IAdviseSink*)&__IAdviseSink; }
- operator IOleInPlaceSite*(void) { return (IOleInPlaceSite*)&__IOleInPlaceSite; }
- operator IOleClientSite*(void) { return (IOleClientSite*)&__IOleClientSite; }
- operator IUnknown*(void) { return (IUnknown*)&__IUnknown; }
-
- private:
- int FRefCount;
- _di_ILockBytes FLockBytes;
- _di_IStorage FStorage;
- _di_IOleObject FOleObject;
- int FDrawAspect;
- tagPOINT FViewSize;
- Classes::TStringList* FObjectVerbs;
- int FDataConnection;
- _di_IVCLFrameForm FDocForm;
- _di_IVCLFrameForm FFrameForm;
- _di_IOleInPlaceObject FOleInPlaceObject;
- _di_IOleInPlaceActiveObject FOleInPlaceActiveObject;
- HACCEL FAccelTable;
- int FAccelCount;
- Menus::TPopupMenu* FPopupVerbMenu;
- bool FAllowInPlace;
- bool FAllowActiveDoc;
- TAutoActivate FAutoActivate;
- bool FAutoVerbMenu;
- TFormBorderStyle FBorderStyle;
- bool FCopyOnSave;
- bool FOldStreamFormat;
- TSizeMode FSizeMode;
- bool FObjectOpen;
- bool FUIActive;
- bool FModified;
- bool FModSinceSave;
- bool FFocused;
- bool FNewInserted;
- Classes::TNotifyEvent FOnActivate;
- Classes::TNotifyEvent FOnDeactivate;
- TObjectMoveEvent FOnObjectMove;
- Classes::TNotifyEvent FOnResize;
- _di_IOleDocumentView FDocView;
- bool FDocObj;
- HIDESBASE HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
- HIDESBASE int __stdcall _AddRef(void);
- HIDESBASE int __stdcall _Release(void);
- HRESULT __stdcall SaveObject(void);
- HRESULT __stdcall GetMoniker(int dwAssign, int dwWhichMoniker, /* out */ _di_IMoniker &mk);
- HRESULT __stdcall GetContainer(/* out */ _di_IOleContainer &container);
- HRESULT __stdcall ShowObject(void);
- HRESULT __stdcall OnShowWindow(BOOL fShow);
- HRESULT __stdcall RequestNewObjectLayout(void);
- HRESULT __stdcall ContextSensitiveHelp(BOOL fEnterMode);
- HRESULT __stdcall GetWindow(/* out */ HWND &wnd);
- HRESULT __stdcall CanInPlaceActivate(void);
- HRESULT __stdcall OnInPlaceActivate(void);
- HRESULT __stdcall OnUIActivate(void);
- HRESULT __stdcall GetWindowContext(/* out */ _di_IOleInPlaceFrame &frame, /* out */ _di_IOleInPlaceUIWindow
- &doc, /* out */ Windows::TRect &rcPosRect, /* out */ Windows::TRect &rcClipRect, /* out */ tagOIFI
- &frameInfo);
- HRESULT __stdcall Scroll(const tagPOINT scrollExtent);
- HRESULT __stdcall OnUIDeactivate(BOOL fUndoable);
- HRESULT __stdcall OnInPlaceDeactivate(void);
- HRESULT __stdcall DiscardUndoState(void);
- HRESULT __stdcall DeactivateAndUndo(void);
- HRESULT __stdcall OnPosRectChange(const Windows::TRect &rcPosRect);
- void __stdcall OnDataChange(const tagFORMATETC &formatetc, const tagSTGMEDIUM &stgmed);
- void __stdcall OnViewChange(int dwAspect, int lindex);
- void __stdcall OnRename(const _di_IMoniker mk);
- void __stdcall OnSave(void);
- void __stdcall OnClose(void);
- HRESULT __stdcall ActivateMe(_di_IOleDocumentView View);
- HRESULT __stdcall GetObjectInfo(int dwObject, int &dwObjSize, char * &lpszLabel, char * &lpszType,
- char * &lpszShortType, char * &lpszLocation);
- HRESULT __stdcall GetConvertInfo(int dwObject, GUID &ClassID, Word &wFormat, GUID &ConvertDefaultClassID
- , System::PGUID &lpClsidExclude, int &cClsidExclude);
- HRESULT __stdcall ConvertObject(int dwObject, const GUID &clsidNew);
- HRESULT __stdcall GetViewInfo(int dwObject, int &hMetaPict, int &dvAspect, int &nCurrentScale);
- HRESULT __stdcall SetViewInfo(int dwObject, int hMetaPict, int dvAspect, int nCurrentScale, BOOL bRelativeToOrig
- );
- void __fastcall AdjustBounds(void);
- void __fastcall CheckObject(void);
- void __fastcall CreateAccelTable(void);
- void __fastcall CreateStorage(void);
- void __fastcall DesignModified(void);
- void __fastcall DestroyAccelTable(void);
- void __fastcall DestroyVerbs(void);
- int __fastcall GetBorderWidth(void);
- bool __fastcall GetCanPaste(void);
- bool __fastcall GetIconic(void);
- bool __fastcall GetLinked(void);
- int __fastcall GetObjectDataSize(void);
- Classes::TStrings* __fastcall GetObjectVerbs(void);
- System::AnsiString __fastcall GetOleClassName(void);
- System::Variant __fastcall GetOleObject(void);
- int __fastcall GetPrimaryVerb(void);
- System::AnsiString __fastcall GetSourceDoc(void);
- TObjectState __fastcall GetState(void);
- void __fastcall InitObject(void);
- void __fastcall ObjectMoved(const Windows::TRect &ObjectRect);
- void __fastcall PopupVerbMenuClick(System::TObject* Sender);
- void __fastcall SetBorderStyle(Forms::TBorderStyle Value);
- void __fastcall SetDrawAspect(bool Iconic, int IconMetaPict);
- void __fastcall SetFocused(bool Value);
- void __fastcall SetIconic(bool Value);
- void __fastcall SetSizeMode(TSizeMode Value);
- void __fastcall SetUIActive(bool Active);
- void __fastcall SetViewAdviseSink(bool Enable);
- void __fastcall UpdateObjectRect(void);
- void __fastcall UpdateView(void);
- HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
- MESSAGE void __fastcall CMDocWindowActivate(Messages::TMessage &Message);
- MESSAGE void __fastcall CMUIDeactivate(Messages::TMessage &Message);
- HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
- HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- HIDESBASE MESSAGE void __fastcall WMWindowPosChanged(Messages::TWMWindowPosMsg &Message);
-
- protected:
- HIDESBASEDYNAMIC void __fastcall Changed(void);
- virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
- DYNAMIC void __fastcall DblClick(void);
- virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
- DYNAMIC void __fastcall DoEnter(void);
- DYNAMIC Menus::TPopupMenu* __fastcall GetPopupMenu(void);
- DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
- DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
- int Y);
- virtual void __fastcall Paint(void);
-
- public:
- __fastcall virtual TOleContainer(Classes::TComponent* AOwner);
- __fastcall virtual ~TOleContainer(void);
- bool __fastcall ChangeIconDialog(void);
- void __fastcall Close(void);
- void __fastcall Copy(void);
- void __fastcall CreateLinkToFile(const System::AnsiString FileName, bool Iconic);
- void __fastcall CreateObject(const System::AnsiString OleClassName, bool Iconic);
- void __fastcall CreateObjectFromFile(const System::AnsiString FileName, bool Iconic);
- void __fastcall CreateObjectFromInfo(const TCreateInfo &CreateInfo);
- void __fastcall DestroyObject(void);
- void __fastcall DoVerb(int Verb);
- int __fastcall GetIconMetaPict(void);
- bool __fastcall InsertObjectDialog(void);
- void __fastcall LoadFromFile(const System::AnsiString FileName);
- void __fastcall LoadFromStream(Classes::TStream* Stream);
- bool __fastcall ObjectPropertiesDialog(void);
- void __fastcall Paste(void);
- bool __fastcall PasteSpecialDialog(void);
- void __fastcall Run(void);
- void __fastcall SaveAsDocument(const System::AnsiString FileName);
- void __fastcall SaveToFile(const System::AnsiString FileName);
- void __fastcall SaveToStream(Classes::TStream* Stream);
- void __fastcall UpdateObject(void);
- void __fastcall UpdateVerbs(void);
- __property bool CanPaste = {read=GetCanPaste, nodefault};
- __property bool Linked = {read=GetLinked, nodefault};
- __property bool Modified = {read=FModified, write=FModified, nodefault};
- __property bool NewInserted = {read=FNewInserted, nodefault};
- __property Classes::TStrings* ObjectVerbs = {read=GetObjectVerbs};
- __property System::AnsiString OleClassName = {read=GetOleClassName};
- __property System::Variant OleObject = {read=GetOleObject};
- __property _di_IOleObject OleObjectInterface = {read=FOleObject};
- __property int PrimaryVerb = {read=GetPrimaryVerb, nodefault};
- __property System::AnsiString SourceDoc = {read=GetSourceDoc};
- __property TObjectState State = {read=GetState, nodefault};
- __property _di_IStorage StorageInterface = {read=FStorage};
-
- __published:
- __property bool AllowInPlace = {read=FAllowInPlace, write=FAllowInPlace, default=1};
- __property bool AllowActiveDoc = {read=FAllowActiveDoc, write=FAllowActiveDoc, default=1};
- __property TAutoActivate AutoActivate = {read=FAutoActivate, write=FAutoActivate, default=2};
- __property bool AutoVerbMenu = {read=FAutoVerbMenu, write=FAutoVerbMenu, default=1};
- __property Align ;
- __property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
- __property Caption ;
- __property Color ;
- __property bool CopyOnSave = {read=FCopyOnSave, write=FCopyOnSave, default=1};
- __property Ctl3D ;
- __property DragCursor ;
- __property DragMode ;
- __property Enabled ;
- __property bool Iconic = {read=GetIconic, write=SetIconic, stored=false, nodefault};
- __property bool OldStreamFormat = {read=FOldStreamFormat, write=FOldStreamFormat, default=0};
- __property ParentColor ;
- __property ParentCtl3D ;
- __property ParentShowHint ;
- __property PopupMenu ;
- __property ShowHint ;
- __property TSizeMode SizeMode = {read=FSizeMode, write=SetSizeMode, default=0};
- __property TabOrder ;
- __property TabStop ;
- __property Visible ;
- __property Classes::TNotifyEvent OnActivate = {read=FOnActivate, write=FOnActivate};
- __property Classes::TNotifyEvent OnDeactivate = {read=FOnDeactivate, write=FOnDeactivate};
- __property OnDragDrop ;
- __property OnDragOver ;
- __property OnEndDrag ;
- __property OnEnter ;
- __property OnExit ;
- __property OnMouseDown ;
- __property OnMouseMove ;
- __property OnMouseUp ;
- __property OnKeyDown ;
- __property OnKeyPress ;
- __property OnKeyUp ;
- __property TObjectMoveEvent OnObjectMove = {read=FOnObjectMove, write=FOnObjectMove};
- __property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
- __property OnStartDrag ;
- public:
- /* TWinControl.CreateParented */ __fastcall TOleContainer(HWND ParentWindow) : Controls::TCustomControl(
- ParentWindow) { }
-
- };
-
- class DELPHICLASS TOleForm;
- class PASCALIMPLEMENTATION TOleForm : public System::TInterfacedObject
- {
- typedef System::TInterfacedObject inherited;
-
- private:
- void *__IOleForm; /* Forms::IOleForm */
- void *__IOleWindow; /* IOleWindow */
- void *__IOleInPlaceUIWindow; /* IOleInPlaceUIWindow */
- void *__IOleInPlaceFrame; /* IOleInPlaceFrame */
- void *__IVCLFrameForm; /* Olectnrs::IVCLFrameForm */
-
- public:
- operator IVCLFrameForm*(void) { return (IVCLFrameForm*)&__IVCLFrameForm; }
- operator IOleInPlaceFrame*(void) { return (IOleInPlaceFrame*)&__IOleInPlaceFrame; }
- operator IOleInPlaceUIWindow*(void) { return (IOleInPlaceUIWindow*)&__IOleInPlaceUIWindow; }
- operator IOleWindow*(void) { return (IOleWindow*)&__IOleWindow; }
- operator IOleForm*(void) { return (IOleForm*)&__IOleForm; }
-
- private:
- Forms::TCustomForm* FForm;
- Classes::TList* FContainers;
- _di_IOleInPlaceActiveObject FActiveObject;
- int FSaveWidth;
- int FSaveHeight;
- Classes::TList* FHiddenControls;
- Controls::TControl* FSpacers[4];
- void __fastcall OnDestroy(void);
- void __fastcall OnResize(void);
- HRESULT __stdcall GetWindow(/* out */ HWND &wnd);
- HRESULT __stdcall ContextSensitiveHelp(BOOL fEnterMode);
- HRESULT __stdcall GetBorder(/* out */ Windows::TRect &BorderRect);
- HRESULT __stdcall RequestBorderSpace(const Windows::TRect &borderwidths);
- HRESULT __stdcall SetBorderSpace(Windows::PRect pborderwidths);
- HRESULT __stdcall SetActiveObject(const _di_IOleInPlaceActiveObject ActiveObject, wchar_t * pszObjName
- );
- HRESULT __stdcall InsertMenus(HMENU hmenuShared, tagOleMenuGroupWidths &menuWidths);
- HRESULT __stdcall SetMenu(HMENU hmenuShared, HMENU holemenu, HWND hwndActiveObject);
- HRESULT __stdcall RemoveMenus(HMENU hmenuShared);
- HRESULT __stdcall SetStatusText(wchar_t * pszStatusText);
- HRESULT __stdcall EnableModeless(BOOL fEnable);
- HRESULT __stdcall TranslateAccelerator(tagMSG &msg, Word wID);
- void __fastcall AddContainer(TOleContainer* Instance);
- void __fastcall RemoveContainer(TOleContainer* Instance);
- Forms::TCustomForm* __fastcall Form(void);
- void __fastcall ClearBorderSpace(void);
- bool __fastcall IsSpacer(Controls::TControl* Control);
- bool __fastcall IsToolControl(Controls::TControl* Control);
-
- public:
- __fastcall TOleForm(Forms::TCustomForm* Form);
- __fastcall virtual ~TOleForm(void);
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define ovShow (Shortint)(-1)
- #define ovOpen (Shortint)(-2)
- #define ovHide (Shortint)(-3)
- #define ovUIActivate (Shortint)(-4)
- #define ovInPlaceActivate (Shortint)(-5)
- #define ovDiscardUndoState (Shortint)(-6)
- #define ovPrimary (int)(-65536)
- extern PACKAGE void __fastcall DestroyMetaPict(int MetaPict);
-
- } /* namespace Olectnrs */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Olectnrs;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // OleCtnrs
-